home *** CD-ROM | disk | FTP | other *** search
/ Champak 99 / (Vol 99) Jan 19 2010.iso / Games / balls.swf / scripts / frame_3 / PlaceObject2_43_7 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2010-01-19  |  1.1 KB  |  52 lines

  1. onClipEvent(enterFrame){
  2.    _root.tent = score;
  3.    if(_root.ball1.inside == true)
  4.    {
  5.       score += 1;
  6.    }
  7.    if(_root.fallNow == true && counter++ > 50)
  8.    {
  9.       if(_xscale - dy > fall)
  10.       {
  11.          dy += 0.05;
  12.          _xscale = _yscale = _xscale - dy;
  13.       }
  14.       else
  15.       {
  16.          _xscale = fall;
  17.          dy *= -0.4;
  18.       }
  19.       dy *= 0.98;
  20.    }
  21.    if(_root.riseNow == true)
  22.    {
  23.       _root.fallNow = false;
  24.       if(dy2 + _xscale <= 100)
  25.       {
  26.          _xscale = _yscale = _xscale + dy2;
  27.          dy2 += 0.005;
  28.          _root.ball1._xscale = _root.ball1._yscale = _xscale;
  29.       }
  30.       else
  31.       {
  32.          with(_root.ball1)
  33.          {
  34.             _xscale = _yscale = 100;
  35.             inside = true;
  36.             fallDist = 100;
  37.             fallRate = 0;
  38.          }
  39.          counter = 0;
  40.          score = 0;
  41.          _root.riseNow = false;
  42.          _root.maxim = 6;
  43.          _xscale = _yscale = 100;
  44.          dy2 = 0;
  45.       }
  46.    }
  47.    this.filters = [glow];
  48.    this.blur = 0.8 * (_xscale - fall);
  49.    this.glow.blurX = this.glow.blurY = this.blur;
  50.    this.glow.strength = 1;
  51. }
  52.